import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import helloWorld from '@/components/HelloWorld'
import login from '@/components/login'
import appMain from '@/components/appMain'


Vue.use(Router)
/**
 * routes==默认路由节点
 */
export const routes  = [
  {
    path:'/login',
    component: login,
    meta: {isLink: false},
  },
  {
      path:'/index',
      name:'首页',
      leaf:true,
      component: index,
      meta: {isLink: true},
      redirect:"/helloWorld",
      children:[{
        path: '/helloWorld',
        component: helloWorld
      }
    ]
  },
  {
      path:'/data',
      name:'数据展示',
      leaf:false,
      component: index,
      meta: {isLink: true},
      children:[{
        name:"表格",
        path: '/data/table',
        component: resolve => { require(['@/views/data/table.vue'], resolve) }
      },
      {
        name:"树形",
        path: '/data/tree',
        component: resolve => { require(['@/views/data/tree.vue'], resolve) }
      }
    ]
  },
  {
      path:'/form',
      name:'表单',
      leaf:false,
      component: index,
      meta: {isLink: true},
      children:[{
        name:"基础表单",
        path: '/form/baseForm',
        component: resolve => { require(['@/views/form/baseForm.vue'], resolve) }
      },
      {
        name:"行内表单",
        path: '/form/inlineForm',
        component: resolve => { require(['@/views/form/inlineForm.vue'], resolve) }
      }
    ]
  }
]

export const syncRoutes =[




]
